From d61d5e12e118e714b1e31c84e754339cd71f19c4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 16 Oct 2007 17:41:33 +0100 Subject: [PATCH] xend: xenapi: Suspended domain causes fault if vif.get_all_records() is called A single suspended domain on the system causes a fault when vif.get_all_records() is called since this returns an ErrorDescription and no 'Value' in the 'v' dictionary. This patch now returns a 'None' as Value which might not be optimal but better than faulting. Signed-off-by: Stefan Berger --- tools/python/xen/xend/XendAPI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 9c119edb31..183ddcb502 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -555,7 +555,7 @@ class XendAPI(object): return xen_api_success(ref) def unpack(v): - return v['Value'] + return v.get('Value') def _get_all_records(_api_cls): return lambda s, session: \ -- 2.30.2